package com.javaclimb.service.impl;

import com.javaclimb.mappers.AnalyseDataMapper;
import com.javaclimb.pojo.AnalyseData;
import com.javaclimb.service.AnalyseDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class AnalyseDataServiceImp implements AnalyseDataService {
    @Autowired
    private AnalyseDataMapper analyseDataMapper;

    @Override
    public List<AnalyseData> getCityTreeCount() {
        List<String> cities =  Arrays.asList(
                "广州市",
                "深圳市",
                "珠海市",
                "汕头市",
                "佛山市",
                "韶关市",
                "河源市",
                "梅州市",
                "惠州市",
                "汕尾市",
                "东莞市",
                "中山市",
                "江门市",
                "阳江市",
                "湛江市",
                "茂名市",
                "肇庆市",
                "清远市",
                "潮州市",
                "揭阳市",
                "云浮市"
        );
        return analyseDataMapper.getCityTreeCount(cities);
    }

    @Override
    public List<AnalyseData> getLevelCount() {
        return analyseDataMapper.getLevelCount();
    }

    @Override
    public List<AnalyseData> getGrowthStatusCount() {
        return analyseDataMapper.getGrowthStatusCount();
    }

    @Override
    public List<AnalyseData> getFamilyCount() {
        return analyseDataMapper.getFamilyCount();
    }

    @Override
    public List<AnalyseData> getGenusCount() {
        return analyseDataMapper.getGenusCount();
    }

    @Override
    public List<AnalyseData> getChineseNameCount() {
        return analyseDataMapper.getChineseNameCount();
    }
}
